Skip to content

fix null pointer dereference in php_mail_detect_multiple_crlf via error_log#20862

Closed
jordikroon wants to merge 2 commits intophp:masterfrom
jordikroon:fix/gh20858
Closed

fix null pointer dereference in php_mail_detect_multiple_crlf via error_log#20862
jordikroon wants to merge 2 commits intophp:masterfrom
jordikroon:fix/gh20858

Conversation

@jordikroon
Copy link
Copy Markdown
Contributor

Fixes #20858

@devnexen
Copy link
Copy Markdown
Member

devnexen commented Jan 7, 2026

nice but be mindful next times when a ticket had been assigned already.

@jordikroon
Copy link
Copy Markdown
Contributor Author

Sorry for that @devnexen. I should have put a comment before working on it. I can't self assign myself unfortunately.
I will be more careful next time.

@devnexen
Copy link
Copy Markdown
Member

devnexen commented Jan 7, 2026

it s fine no big deal. Cheers.

Comment thread ext/standard/basic_functions.c Outdated
@jordikroon jordikroon force-pushed the fix/gh20858 branch 3 times, most recently from 08b1619 to 11f4730 Compare January 7, 2026 22:25
Comment thread ext/standard/basic_functions.c Outdated
Copy link
Copy Markdown
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix itself looks good, but I ll let it live for a while, e.g. tests might need updates/changes.

Copy link
Copy Markdown
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jordikroon!

Comment thread tests/basic/gh20858.phpt Outdated
Comment thread tests/basic/gh20858.phpt Outdated
Comment thread tests/basic/gh20858.phpt
Comment thread ext/standard/basic_functions.c Outdated
@jordikroon
Copy link
Copy Markdown
Contributor Author

Thank you all for your feedback. And for going through my learning experience 😅 Much appreciated.

Copy link
Copy Markdown
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning on refactoring that code a bit more, mainly adding a warning that the to param is required for the email mode. But that is a reasonable fix for the time being.

Copy link
Copy Markdown
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @jordikroon! @devnexen Feel free to merge when you're happy with the PR.

Comment thread tests/basic/gh20858.phpt
unlink($filePath);
}
?>
--EXPECTF--
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: F may be dropped

@devnexen devnexen closed this in 51b1aa1 Jan 10, 2026
@devnexen
Copy link
Copy Markdown
Member

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null pointer dereference in php_mail_detect_multiple_crlf via error_log

4 participants